package main

import (
	"fmt"
)

func fn1() {
	fmt.Println("fn1")
}

func fn2() {
	defer func() {
		err := recover()
		if err != nil {
			fmt.Println("异常：", err)
		}
	}()
	panic("抛出一个异常")
}

func fn3() {
	fmt.Println("fn3")
}

func main() {
	fn1()
	fn2()
	//fn3()

	fmt.Println("结束")
}
